package com.xishu.entity.shop;

import com.xishu.annotation.lang.Lang;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

public class NameAndPrice implements Serializable {
    private static final long serialVersionUID = 7557136091671955077L;

    private Long id;

    @ApiModelProperty(value = "名称")
    @Lang(key = "name")
    private String name;

    @ApiModelProperty(value = "名称")
    @Lang(key = "name")
    private String name_zh;

    @ApiModelProperty(value = "名称")
    @Lang(key = "name")
    private String name_en;

    @ApiModelProperty(value = "价格")
    private Double price;

    @ApiModelProperty(value = "是否选中")
    private Boolean select ;

    public NameAndPrice() {
    }

    public NameAndPrice(Long id) {
        this.id = id;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getName_zh() {
        return name_zh;
    }

    public void setName_zh(String name_zh) {
        this.name_zh = name_zh;
    }

    public String getName_en() {
        return name_en;
    }

    public void setName_en(String name_en) {
        this.name_en = name_en;
    }

    public Boolean getSelect() {
        return select;
    }

    public void setSelect(Boolean select) {
        this.select = select;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("NameAndPrice{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", name_zh='").append(name_zh).append('\'');
        sb.append(", name_en='").append(name_en).append('\'');
        sb.append(", price=").append(price);
        sb.append(", select=").append(select);
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NameAndPrice that = (NameAndPrice) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
